package exam;

/**
 * Tests the answer to the second sample question.
 * The text of the question is as follows:
 * "1: Write a method that returns the product of its two parameters."
 * 
 * @author Branden Ogata
 *
 */

public class TestSampleA01 extends Tester
{
  public static void main(String[] args)
  {
    final double points = getPoints(args);
    
    SampleA01 question = new SampleA01();
    
    // Positive * Positive
    System.out.println(test(Category.EQUALS, "product(2, 4):", 8, 
                            question.product(2, 4), percentageToPoints(0.25, points)));
    
    // Positive * Negative
    System.out.println(test(Category.EQUALS, "product(2, -4):", -8, 
                            question.product(2, -4), percentageToPoints(0.25, points)));
    
    // Negative * Positive
    System.out.println(test(Category.EQUALS, "product(-2, 4):", -8, 
                            question.product(-2, 4), percentageToPoints(0.25, points)));
    
    // Negative * Negative
    System.out.println(test(Category.EQUALS, "product(-2, -4):", 8, 
                            question.product(-2, -4), percentageToPoints(0.25, points)));
    
    System.out.format("[%.2f/%.2f]%n", getTotalPoints(), points);
  }
}
